#ifndef _CITY_H_
#define _CITY_H_

#include <string>
#include <sstream>
using namespace std;

/**
 * Implementation of the class City.
 * The city is defined by a name.
 */
class City
{

public:
    City();
    City(string name);
    virtual ~City();

    // City
    string getName() const;
    void setName(string name);

    // I/O
    string printCity();
    void newCity(City & city);

    // Exception treatment
    class InvalidCityName {
    private:
        string value;
    public:
        InvalidCityName(string value) {this->value = value;}
        void printError(ostream & os) {
            os << "Invalid city name. Must not containt neither numbers nor symbols."
                    "Maximum size is 100 characters. Given: " << value << endl;
        }
    };

private:
    string name;

};
#endif // _CITY_H_